/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
 *
 */
import { resolveHookDependency } from '../../utils/task-util.js';
import { TaskNames } from '../common/task-names.js';
import { AbstractModuleHookTask } from '../hook/abstract-module-hook-task.js';
import { ModuleTaskService } from '../service/module-task-service.js';
import { TargetTaskService } from '../service/target-task-service.js';

/**
 * 调试方构建
 *
 * @since 2022/11/29
 */
export class HotReloadBuild extends AbstractModuleHookTask {
  constructor(moduleTaskService: ModuleTaskService) {
    super(moduleTaskService, false, TaskNames.Task.HOT_RELOAD_BUILD);
  }

  initTaskDepends(taskTargetService: TargetTaskService): void {
    this.dependsOn(resolveHookDependency('HotReloadArkTS', taskTargetService.getTargetData().getTargetName()));
  }
}
